﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace MobileShop
{
    public partial class Cart : BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                PageMap = string.Format("Cart[{0}]", this.ResolveUrl("~/Cart.aspx"));
                rptCart.Refresh();
            }
        }

        protected void rptCart_OnNeedDataSource(object sender, EventArgs e)
        {
            rptCart.DataSource = BasePage.SelectedItems.DefaultView;
        }

        protected void rptCart_OnCartChanged(object sender, EventArgs e)
        {
            ((ProductMaster)Master).UpdateCart();
        }
    }
}